import Vue from 'vue'
import Router from 'vue-router'
// import HelloWorld from '@/components/HelloWorld'
// import TestLoad1 from '@/components/TestLoad1'
// import TestLoad2 from '@/components/TestLoad2'
// import TestLoad3 from '@/components/TestLoad3'
// import TestLoad42 from '@/components/TestLoad42'
// import TestLoad43 from '@/components/TestLoad43'
// import TestLoad44 from '@/components/TestLoad44'
// const HelloWorld = () => import(/* webpackChunkName: "lodash0" */ '@/components/HelloWorld')
// const TestLoad1 = () => import(/* webpackChunkName: "lodash1" */ '@/components/TestLoad1')
// const TestLoad2 = () => import(/* webpackChunkName: "lodash2" */ '@/components/TestLoad2')
// const TestLoad3 = () => import(/* webpackChunkName: "lodash3" */ '@/components/TestLoad3')
// const TestLoad42 = () => import(/* webpackChunkName: "lodash42" */ '@/components/TestLoad42')
// const TestLoad43 = () => import(/* webpackChunkName: "lodash43" */ '@/components/TestLoad43')
// const TestLoad44 = () => import(/* webpackChunkName: "lodash44" */ '@/components/TestLoad44')
const HelloWorld = () => import('@/components/HelloWorld')
const TestLoad1 = () => import('@/components/TestLoad1')
const TestLoad2 = () => import('@/components/TestLoad2')
const TestLoad3 = () => import('@/components/TestLoad3')
// const TestLoad42 = () => import('@/components/TestLoad42')
const TestLoad43 = () => import('@/components/TestLoad43')
// const TestLoad44 = () => import('@/components/TestLoad44')
const Index = () => import('@/page/Index/Index.vue')
const Login = () => import('@/page/Login/Login.vue')
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: HelloWorld,
      children: [
        {
          // 当 /user/:id/profile 匹配成功，
          // UserProfile 会被渲染在 User 的 <router-view> 中
          path: 'TestLoad1',
          component: TestLoad1
        },
        {
          // 当 /user/:id/posts 匹配成功
          // UserPosts 会被渲染在 User 的 <router-view> 中
          path: 'TestLoad2',
          component: TestLoad2
        },
        {
          // 当 /user/:id/posts 匹配成功
          // UserPosts 会被渲染在 User 的 <router-view> 中
          path: 'TestLoad3',
          component: TestLoad3
        }
      ]
    },
    {
      path: '/TestLoad42',
      name: 'Login',
      component: Login
    },
    {
      path: '/TestLoad43',
      name: 'TestLoad43',
      component: TestLoad43
    },
    {
      path: '/TestLoad44',
      name: 'Index',
      component: Index
    }
  ]
})
